//
//  MakeAppointmentViewController.h
//  RCA24
//
//  Created by Raul Pacurar on 2/6/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "DateAsiguratViewController.h"
#import "OferteTableViewCell.h"
#import "GradientButton.h"

@interface MakeAppointmentViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
    UIView *blackScreenView;
    
    // Buttons
    
    UIButton *tipPersoanaButton;
    UIButton *dateUtilizatorButton;
    UIButton *dateVehiculButton;
    UIButton *dataIntrariiInVigoareButton;
    UIButton *scopulUtilizariiButton;
    UIButton *alteleButton;
    UIButton *oferteutton;

    // Validation components
    
    NSArray *validationArray;
    
    UIImageView *tipPersoanaValidationImage;
    UIImageView *dateUtilizatorValidationImage;
    UIImageView *dateVehiculValidationImage;
    UIImageView *dataIntrariiInVigoareValidationImage;
    UIImageView *scopulUtilizariiValidationImage;
    UIImageView *alteleValidationImage;
    
    // Suboptions views
    
    UIView *tipPersoanaSupoptionsView;
    UIView *dateUtilizatorSupoptionsView;
    UIView *dateVehiculSupoptionsView;
    UIView *dataIntrariiInVigoareSupoptionsView;
    UIView *scopulUtilizariiSupoptionsView;
    UIView *alteleSupoptionsView;
    UIView *oferteView;
    
    // Tip persoana components
    
    UIButton *tipPersoanaFirstButton;
    UIButton *tipPersoanaSecondButton;
    UIButton *tipPersoanaThirdButton;
    UIButton *tipPersoanaFourthButton;
    UIButton *tipPersoanaFifthButton;
    UIButton *tipPersoanaSixthButton;
    UIButton *tipPersoanaBackButton;
    
    // Date utilizator components
    
    UITextField *judetTextField;
    UITextField *localitateTextField;
    UITextField *cnpTextField;
    
    UIButton *dateUtilizatorBackButton;

    // Date vehicul components
    
    UIButton *dateVehiculBackButton;
    
    // Data intrarii in vigoare components
    
    UIButton *dataIntrariiInVigoareBackButton;
    
    // Scopul utilizarii components
    
    UIButton *scopulUtilizariiFirstButton;
    UIButton *scopulUtilizariiSecondButton;
    UIButton *scopulUtilizariiThirdButton;
    UIButton *scopulUtilizariiFourthButton;
    UIButton *scopulUtilizariiBackButton;
    
    // Altele suboptions
    
    UIButton *alteleFirstButton;
    UIButton *alteleSecondButton;
    UIButton *alteleThirdButton;
    UIButton *alteleBackButton;
    
    // Oferte suboptions
    
    UITableView *oferteTableView;
    
    UIButton *oferteGoNextButton;
    UIButton *oferteBackButton;
    
    //
    IBOutlet UIDatePicker *datePicker;
}

@property (nonatomic, retain) IBOutlet UIView *blackScreenView;

// Buttons

@property (nonatomic, retain) IBOutlet UIButton *tipPersoanaButton;
@property (nonatomic, retain) IBOutlet UIButton *dateUtilizatorButton;
@property (nonatomic, retain) IBOutlet UIButton *dateVehiculButton;
@property (nonatomic, retain) IBOutlet UIButton *dataIntrariiInVigoareButton;
@property (nonatomic, retain) IBOutlet UIButton *scopulUtilizariiButton;
@property (nonatomic, retain) IBOutlet UIButton *ateleButton;
@property (nonatomic, retain) IBOutlet UIButton *oferteButton;

@property (nonatomic, retain) IBOutlet UIImageView *tipPersoanaValidationImage;
@property (nonatomic, retain) IBOutlet UIImageView *dateUtilizatorValidationImage;
@property (nonatomic, retain) IBOutlet UIImageView *dateVehiculValidationImage;
@property (nonatomic, retain) IBOutlet UIImageView *dataIntrariiInVigoareValidationImage;
@property (nonatomic, retain) IBOutlet UIImageView *scopulUtilizariiValidationImage;
@property (nonatomic, retain) IBOutlet UIImageView *alteleValidationImage;

@property (nonatomic, retain) IBOutlet UIView *tipPersoanaSupoptionsView;
@property (nonatomic, retain) IBOutlet UIView *dateUtilizatorSupoptionsView;
@property (nonatomic, retain) IBOutlet UIView *dateVehiculSupoptionsView;
@property (nonatomic, retain) IBOutlet UIView *dataIntrariiInVigoareSupoptionsView;
@property (nonatomic, retain) IBOutlet UIView *scopulUtilizariiSupoptionsView;
@property (nonatomic, retain) IBOutlet UIView *alteleSupoptionsView;
@property (nonatomic, retain) IBOutlet UIView *oferteView;

@property (nonatomic, retain) IBOutlet UIButton *tipPersoanaFirstButton;
@property (nonatomic, retain) IBOutlet UIButton *tipPersoanaSecondButton;
@property (nonatomic, retain) IBOutlet UIButton *tipPersoanaThirdButton;
@property (nonatomic, retain) IBOutlet UIButton *tipPersoanaFourthButton;
@property (nonatomic, retain) IBOutlet UIButton *tipPersoanaFifthButton;
@property (nonatomic, retain) IBOutlet UIButton *tipPersoanaSixthButton;
@property (nonatomic, retain) IBOutlet UIButton *tipPersoanaBackButton;

@property (nonatomic, retain) IBOutlet UITextField *judetTextField;
@property (nonatomic, retain) IBOutlet UITextField *localitateTextField;
@property (nonatomic, retain) IBOutlet UITextField *cnpTextField;
@property (nonatomic, retain) IBOutlet UIButton *dateUtilizatorBackButton;

@property (nonatomic, retain) IBOutlet UIButton *dateVehiculBackButton;

@property (nonatomic, retain) IBOutlet UIButton *dataIntrariiInVigoareBackButton;

@property (nonatomic, retain) IBOutlet UIButton *scopulUtilizariiFirstButton;
@property (nonatomic, retain) IBOutlet UIButton *scopulUtilizariiSecondButton;
@property (nonatomic, retain) IBOutlet UIButton *scopulUtilizariiThirdButton;
@property (nonatomic, retain) IBOutlet UIButton *scopulUtilizariiFourthButton;
@property (nonatomic, retain) IBOutlet UIButton *scopulUtilizariiBackButton;

@property (nonatomic, retain) IBOutlet UIButton *alteleFirstButton;
@property (nonatomic, retain) IBOutlet UIButton *alteleSecondButton;
@property (nonatomic, retain) IBOutlet UIButton *alteleThirdButton;
@property (nonatomic, retain) IBOutlet UIButton *alteleBackButton;

@property (nonatomic, retain) IBOutlet UITableView *oferteTableView;
@property (nonatomic, retain) IBOutlet UIButton *oferteGoNextButton;
@property (nonatomic, retain) IBOutlet UIButton *oferteBackButton;


// Methods

// Initializations;
- (void) initializeScreen;

// Opens the tipPersoana suboption;
- (void) openTipPersoanaSubview;

// If all the data is validated get the offers
- (void) generateOffers;

// Animations

// Animation used to show the selected suboption;
- (void) showSuboptionsViewAnimation: (UIView*) view;

// Animation used to hide the selected suboption;
- (void) hideSuboptionsViewAnimation: (UIView*) view;

// Callbacks

// Proceed to the next view;
- (void) goToNextView;

// Opens the selected submenu;
- (IBAction) openSubMenu: (UIButton*) button;

// Closes the selected submenu;
- (IBAction) closeSubMenu: (UIButton*) button;

// Choose the person type;
- (IBAction) choosePersonType: (UIButton*) button;

// Choose the purpouse of the insurance.
- (IBAction) chooseScopulUtilizarii: (UIButton*) button;

- (IBAction) chooseAltele: (UIButton*) button;


- (IBAction)textFieldReturn:(id)sender;

@end
